package com.HQCourse.vod.vod.controller;

import com.HQCourse.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * 启动vue时加入这段代码，配置环境差亦
 * SET NODE_OPTIONS=--openssl-legacy-provider
 */
@Api("登录注册退出接口")
@RestController
@RequestMapping("admin/vod/teacher/AllLogon")
//解决跨域访问
//@CrossOrigin
public class QueenLogin {
    @ApiOperation("登录接口")
    @PostMapping("login")
    public Result login(){
        Map<String,Object> maps=new HashMap<>();
        maps.put("token","admin-token");
        return Result.ok(maps);
    }
    @ApiOperation("信息接口")
    @GetMapping("/info")
    public Result info(){
        Map<String,Object> maps=new HashMap<>();
        maps.put("roles","admin");
        maps.put("introduction","超级管理员");
        maps.put("avatar","");
        maps.put("name","Super Admin");
        return Result.ok(maps);

    }
    @ApiOperation("退出接口")
    @PostMapping("/info")
    public Result loginOut(){
        return Result.fail(null);

    }

}
